package thread;

public class Demo7 {
    public static void main(String[] args) {
        Thread thread=new Thread(()->{
            while (true) {
                System.out.println("hello Tread");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        thread.start();
        System.out.println("线程id:"+thread.getId());
        System.out.println("线程名字:"+thread.getName());
        System.out.println("线程状态:"+thread.getState());
        System.out.println("线程优先级:"+thread.getPriority());
    }
}
